import QtQuick 2.0
import com.xdqd.classes 1.0

HomeForm {

    Component.onCompleted: {

        tool_camera.strartCamera(0);
//        qrdecoder.startDecoder(200);
//        qrdecoderThread.start();
//        qrdecoder.startDecoder(200);
//        tool_qrdecoder.
//        tool_qr.startDecoder()
    }
    Tool_camera{
        id:tool_camera
    }
//    Tool_qr{
//        id:tool_qr
//    }

    Connections{
        target: tool_camera
        function onNewVideoFrame(img){
//            console.log("onNewVideoFrame")
            image.source="image://imageProvider/0"
            image.source="image://imageProvider/1"

//            tool_qr.setIame(img)
//            qrdecoder.setImage(img)
//            console.log(img)
        }
    }

//    Connections{
//        target: tool_qrdecoder
//        function onQrDecodersuccess(res){
////            qrdecoderThread.quit()
//            console.log(res)
//        }

//        function onQrDecoderfailed(){
//            console.log("onQrDecoderfailed")
//        }
//    }

}

/*##^##
Designer {
    D{i:0;autoSize:true;height:480;width:640}
}
##^##*/
